package com.excerise.collection;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * 集合
 *
 * @author Way on 2021/4/26
 */
public class CollectionTest {

    public static void main(String[] args) {
        // 单列集合
        ArrayList<Object> arrayList = new ArrayList<>();
        arrayList.add("张三");

        System.out.println(arrayList);

        // 双列集合
        HashMap<Object, Object> hashMap = new HashMap<>(16);
        hashMap.put("No.1", "北京");
        hashMap.put("No.2", "上海");

        System.out.println(hashMap);
    }
}
